import BuffUtil from '@/BuffUtil';
import BuffCommon from 'code/Core/Common/BuffCommon';
import AbilityBase from 'code/Scripts/Abilities/base/AbilityBase';
/** 月神祝福 */
export default class DLY_MoonBless extends AbilityBase {
    static instance: DLY_MoonBless;
    buffType: AppBuffType = {
        id: 'buff_DLY_MoonBless',
        art: this.art,
        name: this.abilityName,
        ubertip: '增强持续伤害与持续治疗能力',
        stackCountMax: -1,
        attribute: {
            持续伤害增强: 0.07,
            持续治疗增强: 0.07,
        },
    };
    constructor(id: string) {
        super(id);
        DLY_MoonBless.instance = this;
        this.init();
        this.onLevelChange(this.onLevelChangeEffect.bind(this));
        this.onRemove(this.onLevelChangeEffect.bind(this));
    }
    init() {
        BuffUtil.registerBuffType(this.buffType);
    }
    onLevelChangeEffect(p: { unit: unit; ability: DLY_MoonBless }) {
        let lv = this.getAbilityLevel(p.unit);
        BuffCommon.addBuff({
            target: p.unit,
            caster: p.unit,
            buffTypeId: this.buffType.id,
            ablityId: this.id,
            config: { stack: lv },
        });
    }
}
